package com.shen.start;

import java.util.Scanner;
//控制台输入整数，请设计一个死循环，当用户输入非正数时停止输入
public class Down {
    public static void main(String[] args) {
        int count = 0;
        Scanner scanner = new Scanner(System.in);

        //write your code here......

        int num=scanner.nextInt();
        while(num>0){
            num=scanner.nextInt();
            count++;
        }

        System.out.println(count);
    }
}
